using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;

namespace Liberty.Persistence
{
    public abstract class AbstractSearchCriteria : Object
    {
        #region Constants
        #endregion

        #region Event Handlers
        #endregion

        #region Methods
        public SqlParameter AddParameter( string parameterName, object value )
        {
            return this.AddParameter( new SqlParameter( parameterName, value ) );
        }

        public SqlParameter AddParameter( SqlParameter parameter )
        {
            this.Parameters.Add( parameter );
            return parameter;
        }
        #endregion

        #region Properties
        public List<SqlParameter> Parameters
        {
            get
            {
                return i_Parameters;
            }
            set
            {
                i_Parameters = value;
            }
        }

        public string CommandName
        {
            get
            {
                return i_CommandName;
            }
            set
            {
                i_CommandName = value;
            }
        }
        #endregion

        #region Private Methods
        #endregion

        #region Private Properties
        #endregion

        #region Construction and Finalization
        public AbstractSearchCriteria( string commandName )
        {
            this.CommandName = commandName;
            this.Parameters = new List<SqlParameter>();
        }
        #endregion

        #region Data Elements
        private string i_CommandName;
        private List<SqlParameter> i_Parameters;
        #endregion

    }
}
